Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dsmr] Catch exceptions for RFC2217 compatibility #8420

Merged
merged 1 commit into from
Sep 7, 2020

Conversation

wborn
Copy link
Member

@wborn wborn commented Sep 7, 2020

I did some testing with RFC2217 and the DSMR Binding some time ago and I didn't run into any issues after catching these UnsupportedCommOperationException exceptions.

A similar approach was used for ZWave in openhab/org.openhab.binding.zwave#1337.

Related to openhab/openhab-core#1462.

@wborn wborn requested a review from Hilbrand as a code owner September 7, 2020 08:34
Copy link
Member

@Hilbrand Hilbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I still hoped we could solve this in core (I actually did create something recently, but haven't had time to look into this properly. There is also different behavior when trying to open the port, with rfc2217 it throws a different exception when no connection can be made) @martinvw will also be happy when this is merged so he doesn't have to use his custom build version of this binding with these changes 😄

@Hilbrand Hilbrand added this to the 2.5.9 milestone Sep 7, 2020
@wborn
Copy link
Member Author

wborn commented Sep 7, 2020

Yes I agree it is far from ideal to catch these exceptions in every add-on that uses these methods and also wants to support rfc2217. But on the other hand it's only a couple of extra lines and makes OH 2.5.x users more happy today. 🙂

@Hilbrand Hilbrand merged commit 2fb38d0 into openhab:2.5.x Sep 7, 2020
@wborn wborn deleted the dsmr-rfc2217 branch September 7, 2020 10:54
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Sep 12, 2020
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants